home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / callback.001 / callback~ / callback / lib / dname / lookdname.c < prev   
C/C++ Source or Header  |  1996-07-21  |  332b  |  16 lines

  1.  
  2. #include "dname.p"        
  3.  
  4. int look_dname(char *dname)
  5. {
  6.     int
  7.         index;
  8.  
  9.     for (index = 0; index < ndnames; index++)    /* look for the target */
  10.     {
  11.     if (!strcmp(dname_vector[index].name, dname))    /* name found */
  12.         return (index);            /* ok */
  13.     }   
  14.     return (-1);                                /* not found */
  15. }
  16.